 include('shared.lua')     
 ENT.RenderGroup = RENDERGROUP_TRANSLUCENT

 //[[---------------------------------------------------------     
 //Name: Draw     Purpose: Draw the model in-game.     
 //Remember, the things you render first will be underneath!  
 //-------------------------------------------------------]]  
 function ENT:Draw()
	self.BaseClass.Draw(self)
	self.power = self.Entity:GetNetworkedInt("Power")
	self.cooldown = self.power / 20
	self.ammount = self.power * 2
	local FB = self.Entity:GetNetworkedBool( "Pointing" )

	if (FB == true) then

		local trace = {}
		local vStart = self.Entity:GetPos()
		local vForward = self.Entity:GetUp()
		trace.start = vStart
		trace.endpos = vStart + (vForward * 20480)
		trace.filter = self.Entity
		local tr = util.TraceLine( trace ) 
		self.Entity:SetRenderBoundsWS(self.Entity:GetPos()-self.Entity:GetUp()*self.Entity:BoundingRadius(), tr.HitPos)
		local lasercolor = Color(255,255,255)
		render.SetMaterial(Material("cable/redlaser"))      
		render.DrawBeam(vStart,tr.HitPos,10,0,0,lasercolor)
	end
	if ( LocalPlayer():GetEyeTrace().Entity == self.Entity and EyePos():Distance( self.Entity:GetPos() ) < 256) then
		AddWorldTip( self.Entity:EntIndex(), "Compressed Gas Gun\n" .. "\nFire Rate: " .. self.cooldown .. "\nResource used: " .. self.ammount .. "\nDamage: " .. self.power, 0.5, self.Entity:GetPos(), self.Entity  )
	end	
	self.Entity:DrawModel()
	
end 

